package cn.edu.ctbu.sbadmin.teacher.controller;
import cn.edu.ctbu.sbadmin.common.controller.BaseController;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TeacherClassController extends BaseController {
    //有两个视图
    @RequestMapping("/teacher/dimclass/list")   //我的url
    @RequiresPermissions("teacher:dimclass:list")  //如果有dimclass下的list权限，则可以执行list()方法,否则不可以访问
    public  String list(){   //得到一个列表
        return "/teacher/dimclass/list";
    }

    /**
     * {comments}管理的编辑及新增页面
     * @return
     * edit既是编辑又是新增
     */
    @RequestMapping("/teacher/dimclass/edit")
    @RequiresPermissions("teacher:dimclass:edit")  //可以编辑
    public  String edit(){
        return "/teacher/dimclass/edit";
    }
}
